<?php
use yii\helpers\Url;
$this->registerJsFile('@web/js/search.js',['depends'=>['app\assets\AppAsset']]);
?>
<script type="text/javascript">
    var userid=1;
</script>
<div class="sq-search">
    <div class="total-lead clearfix">
        <div class="hot-slove pull-left"><i class="fa fa-fire"></i>&nbsp;&nbsp;搜索</div>
        <ul class="pull-left list-inline parts">
            <li class="all-part">全部<div id="add-icon" class="hidden"></div></li>
            <li class="speak">口语<div id="add-icon" class="hidden"></div></li>
            <li class="write">作文<div id="add-icon" class="hidden"></div></li>
        </ul>
    </div>
</div>
<div class="main-part">
	<table class="table">
		<tbody>
			<tr class="hidden">
				<th class="none"></th>
				<th></th>
				<th></th>
				<th></th>
				<th></th>
				<th><i class="fa fa-user"></i></th>
				<th><i class="fa fa-play-circle"></i></th>
				<th></th>
				<th class="none"></th>
			</tr>
            <?php
            foreach ($comment as $item)
            {
            ?>
                <tr id="" class="<?=$item['class1_name']?>">
                    <td class="none"></td>
                    <td><span class="kinds"><?php if($item['class1_name']=='writing') echo'写作';else echo'口语';?></span></td>
                    <td><span class="part"><?=strtoupper($item['class2_name'])?><?php if($item['tnum']>0) echo '-'.$item['tnum']; ?></span></td>
                    <td><i class="fa fa-user"></i>&nbsp;<span class="thiswriter" data-queid="<?=$item['question_id']?>" data-class1="<?=$item['class1_name']?>"><?=$item['user_name'];?></span></td>
                    <td>
                        <?php if($item['class1_name']=='writing')
                        {?>
                            <span class="wordover"><?=$item['comment_content'];?></span>
                        <?php }else{?>
                        <span class="recordimg">
                            <img src="<?=Url::to("@web/images/xx.jpg");?>">
                            <audio src="<?=$item['url'];?>"></audio></span>
                    </td>
                    <?php }?>
                    <td><i class="fa fa-play-circle"></i>&nbsp;&nbsp;<span class="playtimes"><?=$item['play_num'];?></span></td>
                    <td><i class="fa fa-thumbs-o-up"></i>&nbsp;&nbsp;<span class="goodtimes"><?=$item['like_num'];?></span></span></td>
                    <td><span class="date"><?=$item['comment_time'];?></span></td>
                    <td class="none"></td>
                </tr>
        <?php }?>
		</tbody>
	</table>
	<div class="addmore search-addmore">
		<span><i class="fa fa-angle-double-down"></i>&nbsp;&nbsp;加载更多</span>
	</div>
</div>
